package cn.edu.scnu.movies.mapper;

import cn.edu.scnu.movies.entity.movies;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

@Mapper
public interface IndexMapper {

    /**
     * 根据演员姓名查询其ID
     */
    List<Integer> findActorIdsByName(@Param("name") String name);

    /**
     * 根据ID查询演员主演的电影
     */
    List<movies> findMoviesByActorIds(@Param("actorIds") List<Integer> actorIds);

    /**
     * 根据导演姓名查询其执导的电影
     */
    List<movies> findMoviesByDirectorName(String name);
}
